import request from 'network/index'

//查看房源的详情
export function getHouseDetail(id){
  return request({
    url:"/house/all/"+id,
  })
}

//判断当前用户是否点收藏过
export function isCollection(data) {
  return request({
    method:"post",
    url:"/house/collection/judge",
    data
  })
}

//点击收藏
export function toCollection(data){
  return request({
    method:"post",
    url:"/house/collection",
    data
  })
}

//取消收藏
export function cancelCollection(data){
  return request({
    method:"delete",
    url:"/house/collection",
    data
  })
}

//  查看房子的评论
export function getHouseComment(params) {
  return request({
    url:"/house/comment",
    params
  })
}

//添加房子的评论
export function addHouseComment(data){
  return request({
    method:"post",
    url:"/house/comment",
    data
  })
}
